var should = require('should');
var filterSensitiveService = require('../../app/services/filterSensitiveService');
var dataApi = require('../../app/libs/dataApi');

suite('测试filterSensitiveService', function () {
    suite('filter', function () {
        test('过滤敏感词汇', function () {
            var msg = '布什黑峰';
            console.log('msg:', msg);
            console.log('new_msg:', filterSensitiveService.filter(msg));
            console.log('new_msg:', filterSensitiveService.filter(msg));
            console.log('new_msg:', filterSensitiveService.filter(msg));
            console.log('new_msg:', filterSensitiveService.filter(msg));
        });
    });

    suite('filter', function () {
        test('未出现敏感词汇', function () {
            var msg = '中华';
            console.log('msg:', msg);
            console.log('new_msg:', filterSensitiveService.filter(msg));
            console.log('new_msg:', filterSensitiveService.filter(msg));
            console.log('new_msg:', filterSensitiveService.filter(msg));
        });
    });

    suite('detect', function () {
        test('未通过敏感词检查', function () {
            var name = '中华人民共和国';
            console.log('check:', filterSensitiveService.detect(name));
            console.log('check:', filterSensitiveService.detect(name));
            console.log('check:', filterSensitiveService.detect(name));
        });

        test('通过检查', function () {
            var name = '1233523';
            console.log('check:', filterSensitiveService.detect(name));
            console.log('check:', filterSensitiveService.detect(name));
            console.log('check:', filterSensitiveService.detect(name));
        });
    });
});
